// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  app: {
    pageTransition: { name: 'page', mode: 'out-in' },
  },
  css: ['~/assets/css/main.css'],
  compatibilityDate: '2025-07-15',
  devtools: { enabled: true },
  components: [
    // Default ones (~, components/, pages/, layouts/)
    { path: '~/components', pathPrefix: false },

    // feature components
    { path: '~/features', extensions: ['vue'], pathPrefix: false },
  ],
  runtimeConfig: {
    public: {
      apiBase: process.env.NUXT_PUBLIC_API_BASE, // for client-side
    },
    apiBase: process.env.NUXT_API_BASE, // for server-side
  },
  // vite: {
  //   server: {
  //     proxy: {
  //       '/api': {
  //         target: 'http://localhost:8088/family-expense/api',
  //         changeOrigin: true,
  //         rewrite: (path) => path.replace(/^\/api/, ''),
  //       },
  //     },
  //   },
  // },
});
